public class Coordinate {
    private int x;
    private int y;

    public Coordinate(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public static void main(String[] args) {
        System.out.println("张洪健 + 202301110038");
        Coordinate nodeA = new Coordinate(3, 7);
        Coordinate nodeB = new Coordinate(4, 8);

        String output = "点(" + nodeA.getX() + "," + nodeA.getY() + ") 与点(" + nodeB.getX() + "," + nodeB.getY() + ")之间的距离为:"
                + Math.sqrt((nodeA.getX() - nodeB.getX()) * (nodeA.getX() - nodeB.getX())
                + (nodeA.getY() - nodeB.getY()) * (nodeA.getY() - nodeB.getY()));

        System.out.println(output);
    }
}
